package cn.falcon.fmobi.console.exception;

import cn.falcon.fmobi.console.aop.ResultCode;

public class CallBackException extends RuntimeException{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	private int errCode;
	private String message;



	public CallBackException() {
		super();
	}

	public CallBackException(ResultCode code){
		this(code.getValue(),code.getDesc());
	}

	public CallBackException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}

	public CallBackException(String message, Throwable cause) {
		super(message, cause);
	}

	public CallBackException(String message) {
		super(message);
	}

	public CallBackException(Throwable cause) {
		super(cause);
	}
	public CallBackException(int code,String message){
		super(message);
		this.errCode=code;
		this.message=message;
	}

	public int getErrCode() {
		return errCode;
	}

	public void setErrCode(int errCode) {
		this.errCode = errCode;
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
